#pragma once

#include "Task.h"

class CMesh;
class CHausdorffSolver
{
public:
	CHausdorffSolver(void);
	virtual ~CHausdorffSolver(void);

	void SetMesh(int iIndex, CMesh* pMesh) { m_pMesh[iIndex] = pMesh; }
	void Solve();

	void RenderScene();

	HRESULT InitD3DBuffer();
	void OnDestroy();
	void OnLostDevice();
	void OnResetDevice();

private:
	void RenderDomain();

	CMesh* m_pMesh[2];

	std::vector<CTask> m_vTaskBuffer;
	DATA_TYPE m_vEntireDomainMin[3];
	DATA_TYPE m_vEntireDomainMax[3];

	// Domain Cube
	LPDIRECT3DVERTEXBUFFER9 m_pVBCube;
	LPDIRECT3DINDEXBUFFER9 m_pIBCube;

};

